TARGET:=tServer

CPP_FILES := $(wildcard src/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))

CC_FLAGS := -std=c++0x -g -c  -Wall
LD_FLAGS := -std=c++0x
CC := g++
LIBS := /usr/local/lib/liblog4cpp.a -lpthread -lboost_regex

obj/%.o: src/%.cpp
	$(CC) $(CC_FLAGS) -o $@ $<

all: ${TARGET} test

${TARGET}:${OBJ_FILES}
	$(CC) $(LD_FLAGS) -o $@ $^  ${LIBS}

clean:
	rm -rf obj/*
	rm -rf *.log
